package nju.software.xkxt.data.dataobject;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @author typ
 *
 */
@Entity
@Table(name = "selection", catalog = "xkxtbeta")
public class SelectionDO implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = 6868960768903904165L;
	private Integer id;
	private Integer userId;
	private Integer courseId;
	private Integer state;
	private Integer success;
	private Integer max;
	private Integer tid;

	// Constructors

	/** default constructor */
	public SelectionDO() {
	}

	/** full constructor */
	public SelectionDO(Integer userId, Integer courseId, Integer state,
			Integer success, Integer max, Integer tid) {
		this.userId = userId;
		this.courseId = courseId;
		this.state = state;
		this.success = success;
		this.max = max;
		this.tid=tid;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "id", unique = true, nullable = false)
	public Integer getId() {
		return this.id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Column(name = "user_id")
	public Integer getUserId() {
		return this.userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	@Column(name = "course_id")
	public Integer getCourseId() {
		return this.courseId;
	}

	public void setCourseId(Integer courseId) {
		this.courseId = courseId;
	}

	@Column(name = "state")
	public Integer getState() {
		return this.state;
	}

	public void setState(Integer state) {
		this.state = state;
	}

	@Column(name = "success")
	public Integer getSuccess() {
		return this.success;
	}

	public void setSuccess(Integer success) {
		this.success = success;
	}

	@Column(name = "max")
	public Integer getMax() {
		return this.max;
	}

	public void setMax(Integer max) {
		this.max = max;
	}
	@Column(name = "t_id")
	public Integer getTid() {
		return tid;
	}

	public void setTid(Integer tid) {
		this.tid = tid;
	}

}